Skip to content

Conversation

frco9
Copy link

@frco9 frco9 commented Apr 10, 2025

Resolves #2616


Before the change?

  • For self-hosted github (i.e with host different than https://api.github.com/) in the NewRESTClient func the api/v3/ suffix is automatically added. However in the getInstallationAccessToken the same check is done. This results in have a double suffix and thus break the api call

After the change?

  • Not add the suffix if it is already added

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

For self-hosted github (i.e with host different than https://api.github.com/) in the NewRESTClient func the "api/v3/" suffix is automatically added.
However in the `getInstallationAccessToken` the same check is done. This results in have a double suffix.
This fix ensure it is not added if already existing
@nickfloyd nickfloyd moved this from 🆕 Triage to 👀 In review in 🧰 Octokit Active Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: data_source_github_app_token.go wrong baseURL for self-hosted Github Entreprise
1 participant